Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 5 - Bitmap Shapes / Bitmap Shapes Reference
Functions / Editing Bitmaps


GXSetShapePixel

You can use the GXSetShapePixel function to change the pixel value of a specific pixel in a bitmap shape.

void GXSetShapePixel(gxShape target, long x, long y, 
                     const gxColor *newColor, long newIndex);
target
A reference to the bitmap shape containing the pixel to change.
x
The index of the column in which the pixel lies.
y
The index of the row in which the pixel lies.
newColor
A pointer to a gxColor structure indicating the new pixel value of the specified pixel. You may specify nil for this parameter if the target bitmap shape has the gxIndexedSpace color space.
newIndex
An index into a color set. You may use this parameter to set the pixel value if the target bitmap shape has the gxIndexedSpace color space.
DESCRIPTION
The GXSetShapePixel function sets the pixel value of a specific pixel in the target bitmap. The pixel is determined by the values you provide in the x and y parameters. The new pixel value is determined by the newColor or newIndex parameter:

This function posts a functionality_unimplemented error for disk-based bitmaps.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
shape_is_nil 
point_does_not_intersect_bitmap(debugging only)
functionality_unimplemented(debugging only)
Warnings 
shape_does_not_contain_a_bitmap(debugging only)
SEE ALSO
For information about the gxBitmap structure, see "The Bitmap Geometry Structure" beginning on page 5-62.

For information about pixels, pixel values, and pixel offsets, see "Bitmap Geometries" beginning on page 5-5.

To change more than a single pixel of a bitmap, use the GXSetBitmapParts function, which is described on page 5-75.

To examine the value of a pixel, use the GXGetShapePixel function, which is described on page 5-71.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help